import { invoke } from "@tauri-apps/api/core";

// 加载用户组件 
export async function load_xcom_service_dxc() {
  const ret = await invoke("load_dxc", {
    loadInfo: {
      name: "XComService",
      version: "0.0.1",
      config: 'system = true\nmode = \"single\"',
      compatible_versions: [],
    },
  });
  console.log(ret);
}



// 加载用户组件 
export async function load_user_dxc() {
  const ret = await invoke("load_dxc", {
    loadInfo: {
      name: "UserService",
      version: "0.0.1",
      config: '',
      compatible_versions: [],
    },
  });
  console.log(ret);
}


// 加载用户组件 
export async function load_ecommerce_data_analysis_service_dxc() {
  const ret = await invoke("load_dxc", {
    loadInfo: {
      name: "EcommerceDataAnalysisService",
      version: "0.0.1",
      config: '',
      compatible_versions: [],
    },
  });
  console.log(ret);
}

export async function load_rtdata_subscriber_service_dxc() {
  const ret = await invoke("load_dxc", {
    loadInfo: {
      name: "RtdataSubscriberService",
      version: "0.0.1",
      config: 'data-path=\"./\"',
      compatible_versions: [],
    },
  });
  console.log(ret);
}
